package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the tmark database table.
 * 
 */
@Entity
@NamedQuery(name="Tmark.findAll", query="SELECT t FROM Tmark t")
public class Tmark implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int tmarkid;

	@Temporal(TemporalType.TIMESTAMP)
	private Date tmarkdate;

	private int tmarkstaute;

	//bi-directional many-to-one association to Activity
	@ManyToOne
	@JoinColumn(name="activity_id")
	private Activity activity;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-one association to Ttest
	@OneToMany(mappedBy="tmark")
	private List<Ttest> ttests;

	public Tmark() {
	}

	public int getTmarkid() {
		return this.tmarkid;
	}

	public void setTmarkid(int tmarkid) {
		this.tmarkid = tmarkid;
	}

	public Date getTmarkdate() {
		return this.tmarkdate;
	}

	public void setTmarkdate(Date tmarkdate) {
		this.tmarkdate = tmarkdate;
	}

	public int getTmarkstaute() {
		return this.tmarkstaute;
	}

	public void setTmarkstaute(int tmarkstaute) {
		this.tmarkstaute = tmarkstaute;
	}

	public Activity getActivity() {
		return this.activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<Ttest> getTtests() {
		return this.ttests;
	}

	public void setTtests(List<Ttest> ttests) {
		this.ttests = ttests;
	}

	public Ttest addTtest(Ttest ttest) {
		getTtests().add(ttest);
		ttest.setTmark(this);

		return ttest;
	}

	public Ttest removeTtest(Ttest ttest) {
		getTtests().remove(ttest);
		ttest.setTmark(null);

		return ttest;
	}

}